package com.pox.guli.service.edu.feign;

import com.pox.guli.common.base.result.R;
import com.pox.guli.service.edu.feign.fallback.VodMediaServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author PoX21s
 * @Date: 2022/6/5 13:32
 * @Version 1.0
 */

@Service
@FeignClient(value = "service-vod", fallback = VodMediaServiceFallBack.class)
public interface VodMediaService {

    /**
     * 删除 Video 同时删除 VOD 服务器上的视频
     *
     * @param vodId 视频id
     * @return com.pox.guli.common.base.result.R
     */
    @DeleteMapping("/admin/vod/media/remove/{vodId}")
    R removeVideo(@PathVariable("vodId") String vodId);

    @DeleteMapping("/admin/vod/media/remove")
    R removeVideoByIdList(@RequestBody List<String> videoIdList);
}